package com.hwp.mybatisplus.controller;

import com.hwp.mybatisplus.service.impl.UserArticleOperationServiceImpl;
import org.apache.mahout.cf.taste.common.TasteException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hwp
 * @since 2023-03-12
 */
@Controller
@RequestMapping("/userArticleOperation")
public class UserArticleOperationController {

    @Autowired
    UserArticleOperationServiceImpl userArticleOperationService;

    @GetMapping("/recommendations/{userid}")
    public List<Long> recommend(@PathVariable Integer userid) throws TasteException {
        return userArticleOperationService.recommend(userid);
    }

}
